Skip to content

create a variable STATIC_LINUX_SDK_NAME#243

Open
sebsto wants to merge 2 commits intoswiftlang:mainfrom
sebsto:main
Open

create a variable STATIC_LINUX_SDK_NAME#243
sebsto wants to merge 2 commits intoswiftlang:mainfrom
sebsto:main

Conversation

@sebsto
Copy link
Contributor

@sebsto sebsto commented Mar 2, 2026

Extract the repeated _static-linux-0.0.1 suffix into a single STATIC_LINUX_SDK_NAME variable so it's defined once and reused across the install check, download, and build steps. Less copy-paste, easier to update if the version ever changes.

Added a function to select version 0.0.1 or 0.1.0

Update the STATIC_LINUX_SDK_NAME to version 0.1.0 to fix #242

@sebsto sebsto requested a review from a team as a code owner March 2, 2026 08:25
@sebsto
Copy link
Contributor Author

sebsto commented Mar 2, 2026

Tested in a container

root@00c960d1-b95c-4f16-9245-25fc4dc99e33:/work/test# swift --version 
Swift version 6.2.4 (swift-6.2.4-RELEASE)
Target: aarch64-unknown-linux-gnu
root@00c960d1-b95c-4f16-9245-25fc4dc99e33:/work/test# ../.github/workflows/scripts/install
-and-build-with-sdk.sh --static 6.2.4
** Requested Swift version: 6.2.4
** Install Android Swift SDK: false
** Install Static Linux Swift SDK: true
** Install Wasm Swift SDK: false
** Finding latest patch version for Swift 6.2.4
** Fetching releases from swift.org API...
** Found latest patch version: 6.2.4
** Found Static Linux Swift SDK checksum: 24bdf84495dd...
** ✅ Found Swift release tag via 'swift --version': swift-6.2.4-RELEASE
** Current toolchain matches Static Linux Swift SDK snapshot: swift-6.2.4-RELEASE
** Starting install of Swift 6.2.4 Static Linux Swift SDK
** ✅ Static Linux Swift SDK swift-6.2.4-RELEASE is already installed, skipping installation
** Running Swift build with Static Linux Swift SDK
** Running: swift build --swift-sdk swift-6.2.4-RELEASE_static-linux-0.1.0
warning: multiple Swift SDKs match ID `swift-6.2.4-RELEASE_static-linux-0.1.0` and host triple aarch64-unknown-linux-gnu, selected one at /root/.swiftpm/swift-sdks/swift-6.2.4-RELEASE_static-linux-0.1.0.artifactbundle/swift-6.2.4-RELEASE_static-linux-0.1.0/swift-linux-musl
Building for debugging...
[8/8] Linking test
Build complete! (2.95s)
** ✅ Swift build with Static Linux Swift SDK completed successfully

@sebsto
Copy link
Contributor Author

sebsto commented Mar 2, 2026

Sounds like this is a duplicate of #241
I let you choose which approach you want to fix this. Feel free to close it in favour of #241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Builds on Static Linux SDK fails on Swift 6.2

1 participant